package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum SpuTypeEnum {
    NORMAL((byte) 0, "免单商品"),
    SHOP((byte) 1, "商家商品"),
    EXCHANGE((byte) 2, "兑换商品"),
    ORDINARY((byte) 3, "常规商品"),
    COMMISSION((byte) 4, "抢购商品（原：佣金商品）"),
    PARTNER((byte) 5, "合伙人商品,百亿补贴"),
    ;

    private Byte type;
    private String remark;

    SpuTypeEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (SpuTypeEnum item : SpuTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
